package demo2;

public class Text {


    public static void swim1(Swimming swimming){
        swimming.swim();
    }

    public static void run1(IRunning iRunning){
        iRunning.run();
    }

    public static void fly1(IFly iFly){
        iFly.fly();
    }

    public static void main(String[] args) {

        swim1(new Dark("小鸭",1));
        swim1(new Fish("小鱼",2));
        System.out.println("=========");

        run1(new Dog("旺财",10));
        run1(new Dark("小鸭",1));
        System.out.println("=========");
        fly1(new Dark("小鸭",1));
        fly1(new Bird("小鸟",1));

    }
}
